<template>
  <div class="com-full com-flex-c card-frame" :style="imgCard">
    <p class="title">{{ name }}</p>
    <div class="com-flex-1">
      <slot name="body"></slot>
    </div>
  </div>
</template>

<script setup>
import { computed } from "vue";

const props = defineProps({
  name: {
    type: String,
    default: "",
  },
  imgType: {
    type: Number,
    default: 0,
  },
});
const imgCard = computed(() => {
  if (props.imgType === 0) {
    return {
      backgroundImage: `url(imgs/5.png)`,
    };
  } else {
    return {
      backgroundImage: `url(imgs/6.png)`,
    };
  }
});
</script>

<style lang="scss" scoped>
.card-frame {
  background-size: 100% 94%;
  background-repeat: no-repeat;
  background-position: 0%;
  .title {
    margin-left: 3%;
    font-size: 30px;
    font-family: FZZongYi-M05S, FZZongYi-M05S-Regular;
    font-weight: 400;
    font-style: italic;
    text-align: left;
    color: #d5e5ff;
    letter-spacing: 4.5px;
  }
}
</style>